package com.situ.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.situ.utils.AuditEntity;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;

/**
 * 评价模型
 */

@Getter
@Setter
@TableName("product_review")
public class ProductReview extends AuditEntity {
    @TableId(type = IdType.AUTO)
    private Integer id; //评价id

    private String orderItemId; //订单项id

    private Integer userId; //用户id

    private Integer productId; //商品id

    private Integer level; //评价星级 (0-5星)

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime time; //评价时间

    private String content; //评价内容

    private Integer status; //评价状态 (0：待审核  1：已发布)
}
